package com.example.springboot.ytest.ytest;

/**
 * 测试数组
 * 
 * @author: yeyi
 * @date: 2019年10月24日
 */
public class ArrayTest {
	static void t_size() {
		String ss = "";
		String[] oldArr = ss.split(",");
		System.out.println(oldArr.length);
		System.out.println(oldArr.toString());
		
		int [] iArr = new int[0];
		System.out.println(iArr.length);
	}
	
	public static void main(String[] args) {
		t_size();
	}
}
//运行报异常
//Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
//at java.util.ArrayList.rangeCheck(Unknown Source)
//at java.util.ArrayList.get(Unknown Source)
//at com.yeyi.ytest.ArrayListTest.main(ArrayListTest.java:9)